home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
TPUG - Toronto PET Users Group
/
TPUG Users Group CD
/
TPUG Users Group CD.iso
/
COMAL
/
B-Book Series
/
(k)b4.d64
/
solution4.18
< prev
next >
Wrap
Text File
|
2007-02-28
|
757b
|
28 lines
0010 DIM PLAYER$ OF 1, COMP$(3) OF 1, RESULT$ OF 2
0020 FOR K:=1 TO 3 DO READ COMP$(K)
0030 INPUT "TYPE S OR P OR B:": PLAYER$
0040 RESULT$:=PLAYER$+COMP$(RND(1,3))
0050 CASE RESULT$ OF
0060 WHEN "SS"
0070 PRINT "BOTH CUT. A DRAW."
0080 WHEN "SP"
0090 PRINT "SCISSORS CUT PAPER. YOU WIN."
0100 WHEN "SB"
0110 PRINT "BRICK BLUNTS SCISSORS. I WIN."
0120 WHEN "PS"
0130 PRINT "PAPER CUT BY SCISSORS. I WIN."
0140 WHEN "PP"
0150 PRINT "BOTH PAPER. A DRAW."
0160 WHEN "PB"
0170 PRINT "PAPER WRAPS BRICK. YOU WIN."
0180 WHEN "BS"
0190 PRINT "BRICK BLUNTS SCISSORS. YOU WIN."
0200 WHEN "BP"
0210 PRINT "BRICK WRAPPED BY PAPER. I WIN."
0220 WHEN "BB"
0230 PRINT "BOTH BRICK. A DRAW."
0240 OTHERWISE
0250 PRINT "ERROR IN INPUT."
0260 ENDCASE
0270 DATA "S","P","B"